<?php
  class myStringGenerator{
/*Filename Generator*/  
    public static function getFilename($extension=''){
      $microtime = microtime();
      list($msec,$sec) = split(" ",$microtime);
      $msec = round($msec  * 1000);
      return strftime('%Y%m%d%H%M%S').$msec.$extension;
    }
/*iden generator*/  
    public static function getIden(){
      $microtime = microtime();
      list($msec,$sec) = split(" ",$microtime);
      $msec = round($msec  * 1000);    
      return strftime('%Y%m%d%H%M%S').$msec;
    }  
/*
  convert newline to "newline '+'"
*/
    public static function nl2Q($str){
      return str_replace("\n","\\n'+'",$str);
    }
  }
?>